package zsc.ruanc.practicaltraining.model.domain;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import org.hibernate.validator.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 用户投诉表
 */
@Data
public class TComplaint {

  @Min(message = "id不能为小于0", value = 0)
  @ApiModelProperty(value = "投诉表id，自增主键", required = true, dataType = "int")
  private Integer id;


  @ApiModelProperty(value = "投诉者id，外键", required = true, dataType = "int")
  private Integer fromId;


  @ApiModelProperty(value = "被投诉者id，外键", required = true, dataType = "int")
  private Integer toId;

  @NotBlank(message = "content不能为空")
  @ApiModelProperty(value = "投诉内容", required = true, dataType = "string")
  private String content;

  @ApiModelProperty(value = "创建时间", required = false, dataType = "Date")
  private Date created;

  @ApiModelProperty(value = "是否处理", required = false, dataType = "bool")
  private boolean flag;

  @ApiModelProperty(value = "处理结果", required = false, dataType = "string")
  private String result;

  @ApiModelProperty(value = "处理时间", required = false, dataType = "Date")
  private String resultTime;

  @ApiModelProperty(value = "被投诉人的名字", required = false, dataType = "string")
  private String toName;


}
